package com.wish.wishhouse_foreclosure.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MVCConfig implements WebMvcConfigurer {
    //    @MapperScan(basePackages = {"com.zhangzheng.eurekaprovider.mapper"})

//    @Override
//    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//        registry.addResourceHandler("/img/**").addResourceLocations("file:D://img//");
//    }


    /*  @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //.addResourceHandler("/pic/**")访问的地址路径
        //.addResourceLocations("file:D:/1801imgs/")访问的实际磁盘的地址 D:\1801imgs

        registry.addResourceHandler("/pic/**").addResourceLocations("file:D://pic//");
    }*/
//    @Override
//    public void addCorsMappings(CorsRegistry registry) {
//        registry.addMapping("/**")
//                .allowedOrigins("*")
//                .allowCredentials(true)
//                .allowedMethods("*")
//                .maxAge(3600);
//    }



}

